<?xml version="1.0" encoding="UTF-8"?>
<urlset
    xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
    http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

    <?php if (is_array($sitemap)) { ?>

        <?php foreach ($sitemap as $value): ?>
            <url>
                <loc><?php echo $this->Html->url($value['router'], true); ?></loc>
                <priority><?php echo $value['priority']; ?></priority>
                <lastmod><?php echo $value['modified']; ?></lastmod>
                <changefreq>weekly</changefreq>
            </url>
        <?php endforeach; ?>

    <?php } ?>
</urlset>